
import {Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn} from 'typeorm';
import {dateTransformer} from "../../../../common/utils";

@Entity('feedback', {
    comment: '用户反馈表，存储用户提交的各类反馈信息',
})
export class FeedbackEntity {
	@PrimaryGeneratedColumn({ type: 'int', name: 'id', comment: 'id' })
	public id: number;

	@Column({ type: 'int', name: 'user_id', default: null, comment: '用户ID' })
	public userId: number;

	@Column({ type: 'text', name: 'content', default: null, comment: '反馈内容' })
	public content: string;

	@Column({ type: 'varchar', name: 'screenshot', default: '', comment: '截图路径' })
	public screenshot: string;

	@Column({ type: 'char', name: 'del_flag', default: false, comment: '删除标志' })
	public delFlag: string;

	@CreateDateColumn({ type: 'datetime', name: 'create_time', default: null, transformer: dateTransformer, comment: '创建时间' })
	public createTime: Date;

	@UpdateDateColumn({ type: 'datetime', name: 'update_time', default: null, transformer: dateTransformer, comment: '更新时间' })
	public updateTime: Date;

}
